import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.css']
})
export class HeaderComponent implements OnInit {
  public name:string = 'ywj';
  public content:any = '<h1>1234</h1>';
  public arr:number[] = [1, 2, 3, 4, 5];
  public imageUrl:string = 'http://hbimg.b0.upaiyun.com/d550becdf6df15bbc56d9f75640ba528a63716ee10637-06vB9h_fw658';
  public flag:boolean = true;
  public getStatus:number = 1;
  public color:string = 'orange';
  public now:any = new Date();
  public keyword:any = '默认值';
  public arr1:any[] = [
    {
      brand: '宝马',
      list: [
        {
          name: '宝马3系',
          price: '123'
        },
        {
          name: '宝马3系',
          price: '123'
        },
        {
          name: '宝马3系',
          price: '123'
        },
      ]
    },
    {
      brand: '奔驰',
      list: [
        {
          name: '奔驰3系',
          price: '123'
        },
        {
          name: '奔驰3系',
          price: '123'
        },
        {
          name: '奔驰3系',
          price: '123'
        },
      ]
    }
  ];
  constructor() { }
  run(){
    console.log('跑方法');
  }
  getData(){
    console.log(this.name);
  }
  setData(){
    this.name = 'hhhh';
  }
  keyUpFn(e){
    console.log(e.key)
  }
  ngOnInit() {
  }

}
